package com.easyboot.web.monitor.controller;

import com.easyboot.framework.core.ActionResult;
import com.easyboot.framework.core.BaseController;
import com.easyboot.framework.monitor.ServerMonitorDto;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author yushuo
 * @className
 * @descripton TODO
 * @date 2021/6/28 13:09
 **/
@Controller
@RequestMapping("/monitor/server")
public class ServerController extends BaseController {

    /**
    *
     * @author yushuo
     * @description 监控页面
     * @date 13:12 2021/6/28
     * @param []
     * @return com.easyboot.framework.core.ActionResult
    **/
    @GetMapping("/index")
    @RequiresPermissions("monitor:server:index")
    public ActionResult index(ModelMap map) throws Exception{
        ServerMonitorDto server = new ServerMonitorDto();
        server.copyTo();
        map.put("server", server);
        return view();
    }
}
